package article.web;

import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.AbstractController;

import article.dao.ArticleLinkDao;
import article.domain.ArticleLink;

public class ArticleListController extends AbstractController {
	private ArticleLinkDao articleLinkDao;

	@Override
	protected ModelAndView handleRequestInternal(HttpServletRequest arg0,
			HttpServletResponse arg1) throws Exception {

		List<ArticleLink> model = articleLinkDao.getDefaultList();
		return new ModelAndView("index", "articleList", model);
	}

	public void setArticleLinkDao(ArticleLinkDao articleLinkDao) {
		this.articleLinkDao = articleLinkDao;
	}
}
